"""
@project: vcat
@author: kang 
@github: https://github.com/fsksf 
@since: 2021/3/29 2:49 PM
"""
from tests import MOCK_TINIGINE_PATH
from vcat.core.constant import (
    RunningMod
)
from vcat.core.engine import MainEngine
from tests.mock.mock_data_feeder import CSVHistoryFeeder


class BaseRealClass:

    def setup_method(self):
        self.engine = MainEngine()
        self.engine.set_up()
        self.engine.add_history_feeder_class(CSVHistoryFeeder)
        self.engine.add_history_feeder_instance('CSVHistoryFeeder', {})

    def teardown_method(self):
        self.engine.tear_down()
        del self.engine


class BaseBacktestClass:

    def setup_method(self):
        self.engine = MainEngine(mod=RunningMod.BACKTEST)
        self.engine.set_up()
        self.engine.add_history_feeder_class(CSVHistoryFeeder)
        self.engine.add_history_feeder_instance('CSVHistoryFeeder', {})

    def teardown_method(self):
        self.engine.tear_down()
        del self.engine
